/**
 * Copyright (c) 2008 michiyasu wada
 * http://www.seyself.com/
 * 
 * Distributed under The MIT License.
 * [http://www.opensource.org/licenses/mit-license.php]
 */

package demo.scenes 
{
import jp.progression.scenes.SceneObject;



public class DetailScene extends SceneObject
{
    
    private var childScene;
    //--------------------------------------------------------------------------
    //  Constructor
    //--------------------------------------------------------------------------
    public function DetailScene(name:String) 
    {
        super(name);
    }
    
    //--------------------------------------------------------------------------
    //  Override Method
    //--------------------------------------------------------------------------
    override protected function _onDescend():void
    {
        var _destinedSceneId:String = progression.destinedSceneId.toString();
        var path:Array = _destinedSceneId.split("/");
        childScene = new DetailPageScene( path[path.length - 1] );
        addChild( childScene );
    }
    
    override protected function _onAscend():void
    {
        removeChild( childScene );
        childScene = null;
    }
    
    
}

}